var ary = [7,9,6,2,5,1,0,8,4]

function ratio(){
    var x = 0;
    for (var number of ary) {
        if(number % 2 !=0) {
            x++
        }
    }
    console.log(ary.length / x);
}

function maxAry(){
    var max = Math.max(...ary);
    for (var i = 0; i < ary.length; i++) {
        if(ary[i] == max){
            console.log(max);
            console.log(i);
        }
    }
}

function minAry(){
    var min = Math.min(...ary);
    for (var i = 0; i < ary.length; i++) {
        if(ary[i] == min){
            console.log(min);
            console.log(i);
        }
    }
}

function sorting(){
    console.log(ary.sort(function (a, b){return a-b}));
}